public class t2 {
    public static boolean isPalindrome(int x) {
        int res = 0;
        while(x != 0) {
            int temp = x % 10;
            res = (res * 10) + temp;
            x /= 10;
        }
        return res == x;
    }



    public static void main(String[] args) {
        boolean flag = isPalindrome(121);
        System.out.println();

    }

}
